// test.ts

import { MockMethod } from 'vite-plugin-mock'
export default [
  {
    url: '/api/cardcoupon/Touch/prepaid/card/user_select_list',
    method: 'get',
    response: ({ query }) => {
      //?course_id=1394555&X-Businessline-Id=30
      return {
        status: 1,
        msg: 'success',
        data: {
          list: [
            {
              app_id: 100,
              card_number: 'XESH1000130C10766666',
              card_denomination: '5000',
              card_balance: '2745.00',
              bind_time: '2023-02-13 10:13:54',
              card_balance_amount: 274500,
              expiration_date_desc: '2022-07-06\u81f32023-08-02',
              current_status: 10,
            },
            {
              app_id: 100,
              card_number: 'XESH1000130C03666666',
              card_denomination: '5000',
              card_balance: '5000.00',
              bind_time: '2023-02-27 14:29:50',
              card_balance_amount: 500000,
              expiration_date_desc: '2022-07-06\u81f32023-08-02',
              current_status: 10,
            },
          ],
          binding_card_jump_url:
            'https://www.xiwang.com/page/cardcouponh5/?app_blid=30#/cardcoupon?close=1',
        },
        trace_id: 'dayu_65e9f08f72631d9d2b7ee969faece620',
      }
    },
  },
  {
    url: '/api/trade/PC/Order/ConfirmUpdatePrice/index',
    method: 'post',
    response: ({ query }) => {
      // param{
      //   product_info: 'W3sicHJvZHVjdF9pZCI6IjEzOTQ1NTUiLCJwcmljZSI6IjcxNSIsInByb2R1Y3RfbnVtIjoxLCJicmFuZCI6IjEwMCJ9XQ==',
      //   use_gold: '1',
      //   choose_prepaid_cards: [
      //     {
      //       card_number: 'XESH1000130C10766666',
      //       card_balance_amount: '419700'
      //     }
      //   ],
      //   balance: '0',
      //   'X-Businessline-Id': '30'
      // }
      //product_info=W3sicHJvZHVjdF9pZCI6IjEzOTQ1NTUiLCJwcmljZSI6IjcxNSIsInByb2R1Y3RfbnVtIjoxLCJicmFuZCI6IjEwMCJ9XQ%3D%3D&use_gold=1&choose_prepaid_cards%5B0%5D%5Bcard_number%5D=XESH1000130C10766666&choose_prepaid_cards%5B0%5D%5Bcard_balance_amount%5D=419700&balance=0&X-Businessline-Id=30
      return {
        result: {
          status: 1,
          data: {
            realPayPrice: '\u00a50.00',
            realPayPriceNum: '0.00',
            realPayMoney: 0,
            couponInfo: {
              isChecked: 1,
              couponTxt: '\u5df2\u9009\u62e9\u6700\u4f18\u63a8\u8350',
              couponPrice: 9,
              choose_coupon: [{ user_coupon_id: '2M3Q443CBY4SE3XH6XTC' }],
              couponPriceStr: '-\u00a59',
            },
            couponProm: {
              rule_url: 'https://t.bcc.xiwang.com/Rz5xdYSy',
              total_discount: 9,
              reduced_money: 9,
              checked_order_coupon_num: 1,
              order_coupon_reduced_money: '9',
              checked_cash_coupon_num: 0,
              cash_coupon_reduced_money: '0',
              checked_product_coupon_num: 0,
              product_coupon_reduced_money: 0,
              coupon_detail: [
                {
                  promotion_type: 1201,
                  coupon_name: '\u6d4b\u8bd5\u5956\u5b66\u91d1\u8ba2\u5355\u7c7b',
                  reduced_money: '9',
                  allocation_info: [
                    {
                      product_id: 1398768,
                      product_name:
                        '\u3010\u6d4b\u8bd5\u8bfe\u3011\u4e00\u5e74\u7ea7\u6570\u5b66\u6625\u4e0b10',
                      subject_name: '\u6570\u5b66',
                      reduced_money: '9',
                    },
                  ],
                },
              ],
            },
            allPromoPrice: '-\u00a59',
            prepaidReduced: '1.00',
          },
        },
      }
    },
  },
] as MockMethod[]
